<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户详情</title>
    <link rel="stylesheet" th:href="@{/layui/dist/css/layui.css}" media="all">
</head>
<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-col-md11">
            <form class="layui-form" lay-filter="formTestFilter2121" style="margin-top: 50px;margin-left: 200px"
                  th:action="@{/updateAdminManage}">
                <input type="text" hidden="hidden" th:value="${user.id}" name="id">
                <div class="layui-form-item">
                    <label class="layui-form-label">用户编号：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" class="layui-input" readonly="readonly"
                               th:value="${user.username}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">用户姓名：</label>
                    <div class="layui-input-inline" style="width: 290px">
                        <input type="text" name="name" class="layui-input" th:value="${user.name}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">性别：</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <select name="userSex" lay-verify="required">
                            <option value="" th:value="${user.userSex}"></option>
                            <option th:selected="${user.userSex == 1}" value=1>男</option>
                            <option th:selected="${user.userSex == 2}" value=2>女</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">年龄：</label>
                    <div class="layui-input-inline" style="width: 80px;">
                        <input type="text" name="age" class="layui-input" th:value="${user.age}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">手机号：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="userTel" class="layui-input" th:value="${user.userTel}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">所属部门：</label>
                    <div class="layui-input-block" style="width: 350px;">
                        <select name="userDep" lay-verify="required">
                            <option value="" th:value="${user.userDep}"></option>
                            <option th:selected="${user.userDep == '1'}" value=1>总经理办公室</option>
                            <option th:selected="${user.userDep == '2'}" value=2>人力资源部</option>
                            <option th:selected="${user.userDep == '3'}" value=3>财务部</option>
                            <option th:selected="${user.userDep == '4'}" value=4>生产技术部</option>
                            <option th:selected="${user.userDep == '5'}" value=5>计划营销部</option>
                            <option th:selected="${user.userDep == '6'}" value=6>安全监察部</option>
                            <option th:selected="${user.userDep == '7'}" value=7>后勤部</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" style="width: 80px;" type="submit" onclick="exit()">
                            修改
                        </button>
                        <button type="button" class="layui-btn layui-btn-normal" onclick="exit()" style="width: 80px;">
                            返回
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script th:src="@{/layui/dist/layui.all.js}" charset="utf-8"></script>
<script th:src="@{/js/jquery.min.js}" charset="utf-8"></script>
<script type="text/javascript">
    function exit() {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
    }
</script>
</body>
</html>
